<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <script src="../org/angular.min.js"></script>
    <title>Document</title>
</head>
<body ng-app="hd" ng-controller="ctrl">
<div>
    商品：<input type="text" ng-model="goods.title" readonly><br/>
    价格：<input type="text" ng-model="goods.price"readonly><br/>
    数量：<input type="text" ng-model="goods.num"><br/>
    总价：<input type="text" ng-value="goods.num*goods.price"readonly><br/>

</div>
<script>
   var m = angular.module('hd',[]);
   m.controller('ctrl',['$scope',function($scope){
       $scope.goods = {
           'title':'macbook',
           'price': 600,
           'num': 0
       }
   }])
</script>
</body>
</html>